package com.zenith.zongheng.demo.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zenith.zongheng.demo.domain.entity.LeaveFile;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zenith.zongheng.demo.domain.dto.LeaveFileDTO;
import com.zenith.zongheng.demo.domain.entity.LeaveInfo;
import com.zenith.zongheng.demo.domain.vo.LeaveFileVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author tangzx
 * @since 2021-12-07
 */
@Mapper
public interface LeaveFileMapper extends BaseMapper<LeaveFile> {

    /**
     *  通过传入leaveInfoID，filename，filePath
     *  得到实体的id, leave_info_id, filename, file_path
     * @param page 分页对象
     * @param dto  条件参数对象
     * @return     分页对象
     */
    IPage<LeaveFileVO> selectPage(IPage<LeaveFileVO> page, @Param("dto") LeaveFileDTO dto);

    /**
     * 连表查询e
     *
     * @param leaveInfoId 假条id
     * @return 假条对象
     */
    LeaveInfo getLeaveInfoById(Integer leaveInfoId);
}
